Laravel: Set timestamp column to current timestamp

124

<?php

/* For Create */
$table->timestamp('created_at')->useCurrent();

/* For Update */
$table->timestamp('updated_at')->useCurrent()->useCurrentOnUpdate();

Comments

Submit
0 Comments